<%-- 
    Document   : cadastraOutcome
    Created on : 13/12/2009, 12:47:01
    Author     : eduardo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>Gerenciador Financeiro - Controle de Despesas</title>
        </head>
        <body>
            <h1><h:outputText value="Cadastro de Despesa"/></h1>
            <h:form>
                <table>
                    <tr>
                        <td colspan="2"><h:messages /></td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Descricao:" />
                        </td>
                        <td>
                            <h:inputText value="#{OutcomeFace.outcomeInEdit.descriptionOutcome}" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Data:" />
                        </td>
                        <td>
                            <h:inputText value="#{OutcomeFace.outcomeInEdit.expirationData}">
                                <f:convertDateTime dateStyle="short" />
                            </h:inputText>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Valor:" />
                        </td>
                        <td>
                            <h:inputText value="#{OutcomeFace.outcomeInEdit.value}">
                                <f:convertNumber type="currency" />
                            </h:inputText>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Source:" />
                        </td>
                        <td>
                            <h:selectOneMenu value="#{OutcomeFace.outcomeInEdit.source}" >
                                <f:selectItems value="#{OutcomeFace.sources}" />
                                <f:converter converterId="org.gerenciadorfinanceiro.ejb.entity.OutcomeSource" />
                            </h:selectOneMenu>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <h:commandButton value="Incluir" action="#{OutcomeFace.doFinishAddOutcome}" />
                            <h:commandButton value="Cancelar" action="goToMain" />
                        </td>
                    </tr>
                </table>
            </h:form>
        </body>
    </html>
</f:view>
